package com.ddyx.service.product.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 商品条码
 * </p>
 *
 * @author agula
 * @since 2019-08-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("p_goods_barcode")
public class GoodsBarcode extends Model<GoodsBarcode> {

    private static final long serialVersionUID=1L;

    /**
     * 唯一条码ID
     */
    @TableId(value = "barcode_id", type = IdType.AUTO)
    private Integer barcodeId;

    /**
     * SKUID
     */
    private Integer skuId;

    /**
     * 条码
     */
    private String barCode;

    /**
     * 创建时间
     */
    private LocalDateTime gmtCreate;



    @Override
    protected Serializable pkVal() {
        return this.barcodeId;
    }

    @Override
    public String toString() {
        return "GoodsBarcode{" +
        "barcodeId=" + barcodeId +
        ", skuId=" + skuId +
        ", barCode=" + barCode +
        ", gmtCreate=" + gmtCreate +
        "}";
    }
}
